﻿$(function () {
    $.ajaxSetup({ cache: false });
    $("input[name='rbtcashcard']").click(function () {
        var type = $("input[name='rbtcashcard']:checked").val();
        var url = "/Search/LoadCashCardCombox/";
        var data = "{type:'" + type + "'}";
        $.ajax({
            url: url,
            contentType: "application/json",
            type: 'POST',
            data: data,
            dataType: 'json',
            success: function (returndata) {
                $('#cashcard').empty();
                $.each(returndata, function (i, item) {
                    $('#cashcard').append($('<option>').text(item.text).attr('value', item.value));
                });
            }
        });
    });

    $("input[name='rbtcashcard']:checked").triggerHandler('click');

    //$("#rbtCash").prop('checked', true).triggerHandler('click');
})
